package net.xiaoyu233.mitemod.miteite.trans.item;

import net.minecraft.*;
import net.xiaoyu233.mitemod.miteite.entity.EntityInfernalOverlord;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(ItemEnderEye.class)
public class ItemEnderEyeTrans extends Item {
    @Inject(method = "tryInsertEyeIntoFrame",at = @At("HEAD"),cancellable = true)
   public void InjecttryInsertEyeIntoFrame(World world, int x, int y, int z, CallbackInfoReturnable<Boolean> cir){
        if (!EntityInfernalOverlord.isInfernalOverlordDefeated()){
            cir.setReturnValue(true);
        }

    }
}
